<%--
  Created by IntelliJ IDEA.
  User: dailyblue
  Date: 2025/7/15
  Time: 14:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    // 获取到请求的相关信息
    String serverName = request.getServerName();
    int serverPort = request.getServerPort();
    out.println("服务器名称：" + serverName + "<br/>");
    out.println("服务器端口号：" + serverPort + "<br/>");
    String remoteHost = request.getRemoteHost();
    String remoteUser = request.getRemoteUser();
    String remoteAddr = request.getRemoteAddr();
    int remotePort = request.getRemotePort();
    String uri = request.getRequestURI();
    String protocol = request.getProtocol();
    out.print("浏览器：" + remoteHost + "," + remoteUser + "," + remoteAddr + "<br/>");
    out.println("浏览器端口号：" + remotePort + "<br/>");
    out.print("Uri:" + uri + "<br/>");
    out.print("协议：" + protocol);

%>
</body>
</html>
